package com.fita.wechat.entity;

import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.demo2do.core.utils.DateFormatUtils;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fita.entity.order.PayType;

public class CarsSearch {
     
    private Long countryId;
    
    private Long supplierId;
    
    private PayType type;
    
    private Long pickupLocation;
    
    private Long returnLocation;
    
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @JsonFormat(pattern ="yyyy-MM-dd HH:mm")
    private Date pickupDate;
    
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @JsonFormat(pattern ="yyyy-MM-dd HH:mm")
    private Date returnDate;
    
    private Integer driveAge;
    
    private Long setCategoryId;
    
    public CarsSearch() {
    }
    
    public String getPickupDateTime() {
        return DateFormatUtils.format(this.pickupDate, "yyyy-MM-dd HH:mm:ss");
    }
    
    public String getReturnDateTime() {
        return DateFormatUtils.format(this.returnDate, "yyyy-MM-dd HH:mm:ss");
    }
    
    /**
     * 
     * @return
     */
    public String getPickupDateString() {
        return DateFormatUtils.format(this.pickupDate, "MM-dd HH:mm");
    }
    
    /**
     * 
     * @return
     */
    public String getReturnDateString() {
        return DateFormatUtils.format(this.returnDate, "MM-dd HH:mm");
    }


    /**
     * @return the countryId
     */
    public Long getCountryId() {
        return countryId;
    }

    /**
     * @return the supplierId
     */
    public Long getSupplierId() {
        return supplierId;
    }

    /**
     * @return the type
     */
    public PayType getType() {
        return type;
    }

    /**
     * @return the pickupLocation
     */
    public Long getPickupLocation() {
        return pickupLocation;
    }

    /**
     * @return the returnLocation
     */
    public Long getReturnLocation() {
        return returnLocation;
    }

    /**
     * @return the pickupDate
     */
    public Date getPickupDate() {
        return pickupDate;
    }

    /**
     * @return the returnDate
     */
    public Date getReturnDate() {
        return returnDate;
    }

    /**
     * @return the driveAge
     */
    public Integer getDriveAge() {
        return driveAge;
    }

    /**
     * @return the setCategoryId
     */
    public Long getSetCategoryId() {
        return setCategoryId;
    }

    /**
     * @param countryId the countryId to set
     */
    public void setCountryId(Long countryId) {
        this.countryId = countryId;
    }

    /**
     * @param supplierId the supplierId to set
     */
    public void setSupplierId(Long supplierId) {
        this.supplierId = supplierId;
    }

    /**
     * @param type the type to set
     */
    public void setType(PayType type) {
        this.type = type;
    }

    /**
     * @param pickupLocation the pickupLocation to set
     */
    public void setPickupLocation(Long pickupLocation) {
        this.pickupLocation = pickupLocation;
    }

    /**
     * @param returnLocation the returnLocation to set
     */
    public void setReturnLocation(Long returnLocation) {
        this.returnLocation = returnLocation;
    }

    /**
     * @param pickupDate the pickupDate to set
     */
    public void setPickupDate(Date pickupDate) {
        this.pickupDate = pickupDate;
    }

    /**
     * @param returnDate the returnDate to set
     */
    public void setReturnDate(Date returnDate) {
        this.returnDate = returnDate;
    }

    /**
     * @param driveAge the driveAge to set
     */
    public void setDriveAge(Integer driveAge) {
        this.driveAge = driveAge;
    }

    /**
     * @param setCategoryId the setCategoryId to set
     */
    public void setSetCategoryId(Long setCategoryId) {
        this.setCategoryId = setCategoryId;
    }
}
